const path = require('path')
module.exports = {
  devServer: {
    port: 3001,
    open: true,
    proxy: {
      '/conner': {
        target: 'https://api.it120.cc',
        changeOrigin: true,
        pathRewrite: {
          '^/conner': '/conner'
        }
      }
    }
  },
  lintOnSave: false,
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@', path.join(__dirname, 'src'))
      .set('components', path.join(__dirname, 'src/components'))
      .set('views', path.join(__dirname, 'src/views'))
      .set('api', path.join(__dirname, 'src/api'))
      .set('utils', path.join(__dirname, 'src/utils'))
      .set('plugins', path.join(__dirname, 'src/plugins'))
  }
}
